Skip to content

chore: test-fixer 에이전트 및 ask-user 규칙 추가#36

Open
Sean-mn wants to merge 3 commits intodevelopfrom
feat/add-test-fixer
Open

chore: test-fixer 에이전트 및 ask-user 규칙 추가#36
Sean-mn wants to merge 3 commits intodevelopfrom
feat/add-test-fixer

Conversation

@Sean-mn
Copy link
Copy Markdown
Contributor

@Sean-mn Sean-mn commented Apr 5, 2026

📚작업 내용

  • test-fixer 서브에이전트 정의 파일 추가 (.claude/agents/test-fixer.md)
  • ask-user 규칙 파일 추가 — AskUserQuestion 사용 시점 명시 (.claude/rules/ask-user.md)
  • test-fixer-trigger 규칙 파일 추가 — 프로덕션 코드 변경 후 test-fixer 자동 제안 조건 정의 (.claude/rules/test-fixer-trigger.md)
  • CLAUDE.md에 두 규칙 파일 참조 항목 추가
  • settings.local.json에 PATH 설정 허용 명령어 추가
  • 테스트 케이스 추가: UserTests (null 닉네임 예외), RoomTests (MaxPlayers·ExpiresAt 초기값), LoginServiceTests (패밀리 쉐어링 차단), GetRoomServiceTests (null roomCode 케이스), JoinRoomServiceTests (올바른 비밀번호로 입장)

◀️참고 사항

test-fixer 에이전트는 프로덕션 .cs 파일 변경 완료 후 AskUserQuestion으로 실행 여부를 묻고, 승인 시 테스트를 자동 추가·수정·삭제합니다.

✅체크리스트

[ ]안에 x를 작성하면 체크박스를 체크할 수 있습니다.

  • 현재 의도하고자 하는 기능이 정상적으로 작동하나요?
  • 변경한 기능이 다른 기능을 깨뜨리지 않나요?

추후 필요한 체크리스트는 업데이트 될 예정입니다.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new test-fixer agent and supporting rules to automate test suite maintenance, alongside several new test cases for domain entities and services. Feedback primarily addresses the use of hardcoded absolute file paths and user-specific directories in the agent configuration and local settings, suggesting the use of relative paths and general command aliases to ensure environment portability.


- Production code: `PushAndPull/`
- Test code: `PushAndPull.Test/`
- Working directory: `/mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

특정 사용자의 로컬 절대 경로가 하드코딩되어 있습니다. 에이전트가 다양한 개발 환경 및 CI 환경에서 범용적으로 작동할 수 있도록 현재 디렉토리를 의미하는 .으로 수정하는 것이 좋습니다.

Suggested change
- Working directory: `/mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull`
- Working directory: .

## Step 2: Run Build and Tests

```bash
cd /mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull && dotnet build --no-restore 2>&1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

절대 경로를 포함한 cd 명령은 환경 이식성을 저해합니다. 에이전트는 일반적으로 프로젝트 루트에서 실행되므로 cd 명령 없이 직접 실행하거나 상대 경로를 사용하도록 수정해야 합니다.

Suggested change
cd /mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull && dotnet build --no-restore 2>&1
dotnet build --no-restore 2>&1

```

```bash
cd /mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull && dotnet test --no-build 2>&1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

위와 동일하게 절대 경로 의존성을 제거하여 환경 이식성을 확보해야 합니다.

Suggested change
cd /mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull && dotnet test --no-build 2>&1
dotnet test --no-build 2>&1

After all changes, run the full test suite:

```bash
cd /mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull && dotnet build --no-restore 2>&1 && dotnet test --no-build 2>&1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

위와 동일하게 절대 경로 의존성을 제거하여 환경 이식성을 확보해야 합니다.

Suggested change
cd /mnt/c/Users/USER/Documents/GitHub/Push-Pull-server/PushAndPull && dotnet build --no-restore 2>&1 && dotnet test --no-build 2>&1
dotnet build --no-restore 2>&1 && dotnet test --no-build 2>&1

Comment on lines +37 to +38
"Bash(/home/seanyee1227/.dotnet/dotnet build:*)",
"Bash(/home/seanyee1227/.dotnet/dotnet test:*)"
"Bash(/home/seanyee1227/.dotnet/dotnet test:*)",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

특정 사용자의 홈 디렉토리 경로가 포함되어 있습니다. 39번 라인에서 PATH를 추가하고 있으므로, 절대 경로 대신 일반적인 dotnet 명령어를 허용하도록 수정하여 범용성을 높이는 것이 좋습니다.

      "Bash(dotnet build:*)",
      "Bash(dotnet test:*),"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant